package com.atguigu.gmall.feign.search;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.search.Goods;
import com.atguigu.gmall.search.vo.SearchParamVo;
import com.atguigu.gmall.search.vo.SearchRespVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-search")
@RequestMapping("/api/inner/rpc/search")
public interface SearchFeignClient {

    @PostMapping("/searchgoods")
    Result<SearchRespVo> search(@RequestBody SearchParamVo searchParamVo);

    //上架
    @PostMapping("/up/goods")
    Result up(@RequestBody Goods goods);

    //下架
    @GetMapping("/down/goods/{skuId}")
    Result down(@PathVariable("skuId") Long skuId);
}
